package com.fancy.ui.ctrls.ease
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class EsButton extends Sprite
	{
		private var _width:int = 50;
		private var _height:int = 20;
		
		public function EsButton(w:int, h:int)
		{
			super();
			this._width = w;
			this._height = h;
			draw(0xffff00);
			this.addEventListener(MouseEvent.MOUSE_OVER, mouse_over);
			this.addEventListener(MouseEvent.MOUSE_OUT, mouse_out);
		}
		
		private function draw(fillColor:uint):void
		{
			this.graphics.clear();
			this.graphics.beginFill(fillColor);
			this.graphics.drawRect(0, 0, _width, _height);
			this.graphics.endFill();
		}
		
		private function mouse_over(event:MouseEvent):void
		{
			draw(0x00ff00);
		}
		
		private function mouse_out(event:MouseEvent):void
		{
			draw(0xffff00);
		}
		
	}
}